package com.ibeeking.found.upms.g.rest.service;

import com.ibeeking.found.common.entity.CurrentUser;
import com.ibeeking.found.upms.service.common.bo.RolePermissionBO;
import com.ibeeking.found.upms.service.common.param.PermissionRoleParam;
import com.ibeeking.found.upms.service.common.param.RolePermissionParam;

import java.util.List;

/**
 * @project: IGmcRolePermissionService
 * @description: 角色权限接口
 * @Author ibeeking
 * @create: 2020-12-05 15:19:26
 **/
public interface IGmcRolePermissionService {

    /**
     * 通过角色ids查询角色权限
     *
     * @param roleIds
     * @return
     */
    List<RolePermissionBO> queryRolePermissionByRoleIds(List<Long> roleIds);

    /**
     * 查询角色权限关系通过角色ID
     *
     * @param roleId
     * @return
     */
    List<RolePermissionBO> queryRolePermissionByRoleId(Long roleId);

    /**
     * 查询角色权限关系通过权限ID
     *
     * @param permissionId
     * @return
     */
    List<RolePermissionBO> queryRolePermissionByPermissionId(Long permissionId);

    /**
     * 通过角色ID修改权限
     *
     * @param currentUser         当前登录人
     * @param rolePermissionParam 角色权限参数
     * @return
     */
    Boolean modifyRolePermissionByRoleId(CurrentUser currentUser, RolePermissionParam rolePermissionParam);

    /**
     * 修改角色权限关系通过权限ID
     *
     * @param currentUser         当前登录人
     * @param permissionRoleParam 权限角色参数
     * @return
     */
    Boolean modifyRolePermissionByPermissionId(CurrentUser currentUser, PermissionRoleParam permissionRoleParam);
}
